#include "libraries.h"

#include "cspritebase.h"

int CSpriteBase::init(char* filename)
{
	SDL_Surface *temp;
	if((temp=SDL_LoadBMP(filename))==NULL) return -1;
	SDL_SetColorKey(temp,SDL_SRCCOLORKEY,SDL_MapRGB(temp->format,255,0,255));
	image = SDL_DisplayFormat(temp);
	SDL_FreeSurface(temp);
	mW = image->w;
	mH = image->h;
	return 0;
}